package com.example.design.flow.test.test03Skip;

import com.example.design.flow.exception.SkipException;
import com.example.design.flow.node.FlowNode;

/**
 * 抛出SkipException的节点
 */
public class SkipNode extends FlowNode<String> {
    @Override
    public void process(String context) {
        boolean operatable = false;
        if (!operatable) {
            throw new SkipException("无需扣减库存,跳过");
        }
    }
}